<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

// 去掉左右空格
// 答案都是 "a b c"
var str = '  a b c  ';

str.trim()

console.log(str)


    </script>
    
</body>
</html>